package com.blog.service;

import com.blog.mapper.ProductSkuMapper;
import com.blog.seckill.goods.ProductSku;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ProductSkuBaseService
 * @Destription ProductSku基础：增删改查
 * @Author 天堂小野花
 * @Date 2025/8/19  18:23
 * @Version 1.0
 */
@Service
public class ProductSkuBaseService {
    @Autowired
    ProductSkuMapper productSkuMapper;

    //表ProductSku
    public ProductSku selectProductSkuById(Long id){
        return productSkuMapper.selectByPrimaryKey(id);
    }
    public int insertProductSku(ProductSku productSku){
        return productSkuMapper.insert(productSku);
    }
    public int updateProductSku(ProductSku productSku){
        return productSkuMapper.updateByPrimaryKeySelective(productSku);
    }
    public int deleteProductSkuById(Long id){
        return productSkuMapper.deleteByPrimaryKey(id);
    }
}
